<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\WxController;
use App\Http\Controllers\Api\Framework\Common\UploadController;

// 微信服务验证
Route::any('wx/getWeChatMsg',[WxController::class,'getWeChatMsg']);
Route::any('wx/getAmpMsg',[WxController::class,'getAmpMsg']);

// version 1.0
Route::group(['prefix'=>'v1'], function () {
    require base_path('routes/api/v1.php');
});

// 回调
Route::group(['prefix'=>'notify'], function () {
    require base_path('routes/api/notify.php');
});

// 登录权限
Route::group(['middleware' => ['api.sign']], function () {

    // 框架
    Route::group(['prefix'=>'framework'], function () {
        Route::group(['prefix'=>'common'], function () {
            // 文件上传
            Route::post('upload/file', [UploadController::class, 'file']);
            Route::post('upload/image', [UploadController::class, 'image']);
            Route::post('upload/video', [UploadController::class, 'video']);
            Route::post('upload/oss/token', [UploadController::class, 'ossToken']);
        });
    });

});